package com.example.cadmin.controller;


import com.example.cadmin.service.MyRoleUserService;
import com.example.cadmin.utils.ResponseModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author  zzsoft 
 * @since 2023-01-07
 */
@RestController
@RequestMapping("/api/roleuser")
@Api(tags = "系统：用户角色管理")
public class MyRoleUserController {
    @Autowired
    private MyRoleUserService myRoleUserService;

    @PostMapping
    @ResponseBody
    @ApiOperation("通过用户id返回用户角色")
    public ResponseModel getRoleUserByUserId(@RequestBody Map<String,Integer> data){
        return myRoleUserService.getRoleUserByUserId(data.get("userId"));
    }

}
